import { Entity, Column, OneToMany } from "typeorm";
import { DictDataEntity } from "./dict-data.entity";
import { BaseEntity } from "../cores/entry.core/base.entity";

@Entity("webxue_dict_type")
export class DictTypeEntity extends BaseEntity {

  @Column({ type: "varchar", length: 100, comment: "字典类型" })
  dict_type: string;

  @Column({ type: "varchar", length: 500, comment: "备注" })
  remarks: string;

  @OneToMany(() => DictDataEntity, dictData => dictData.dict_type)
  dictDatas: Array<DictDataEntity>;
}
